-- GENERATED SPELL FOR [Count Ungula] --


function spell0_18285(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(17008,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_18285', 5000, 1)
end

function spell1_18285(pUnit, Event) --@Nether Leech,Heal--
pUnit:FullCastSpellOnTarget(35335,pUnit)
pUnit:RegisterEvent('Sorts_18285', 639, 1)
end

function spell2_18285(pUnit, Event) --@Tail Swipe,n/a--
pUnit:FullCastSpellOnTarget(35333,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18285', 522, 1)
end

function Sorts_18285(pUnit, Event)
local choix_sorts_18285 = math.random(0, 2)
if choix_sorts_18285 == 0 then
pUnit:RegisterEvent('spell0_18285', 1, 1)
end
if choix_sorts_18285 == 1 then
pUnit:RegisterEvent('spell1_18285', 1, 1)
end
if choix_sorts_18285 == 2 then
pUnit:RegisterEvent('spell2_18285', 1, 1)
end
end

function mob18285_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18285', math.random(1500, 3000), 1)
end

function mob18285_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18285_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18285_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18285, 1, 'mob18285_Action')
RegisterUnitEvent(18285, 2, 'mob18285_Leave')
RegisterUnitEvent(18285, 3, 'mob18285_Kill')
RegisterUnitEvent(18285, 4, 'mob18285_Die')
